home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Acorn User: China
/
Acorn User China CD-ROM (UK) (Disc B)
/
Acorn User China CD-ROM (UK) (Disc B).bin
/
STUTTGART
/
DOCS
/
GENCSRC
/
UNION1.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1987-11-21
|
478 b
|
20 lines
/* Chapter 11 - Program 5 */
main()
{
union {
int value; /* This is the first part of the union */
struct {
char first; /* These two values are the second */
char second;
} half;
} number;
long index;
for (index = 12;index < 300000;index += 35231) {
number.value = index;
printf("%8x %6x %6x\n",number.value, number.half.first,
number.half.second);
}
}